#pragma once
#include"Tests.h"
#include <iostream>
#include<fstream>
#include <vector>
#include<queue>
#include"Graph_Functions.h"
#include<random>
#include"Tarjan.h"
#include"2-SAT.h"
#include"Tarjan_Tests.h"
#include"2SAT_Tests.h"
using namespace std;

int main()
{
	BFS_Test(); cout << "BFS: success\n";
	DFS_Test(); cout << "DFS: success\n";
	cool_test_for_different_types_of_graphs(); cout << "diffirent types of graph: success\n";
	test_topological_sort(); cout << "topological_sort: success\n";
	//freopen("output_2sat.txt" , "w", stdout);
	Mega_2SAT_Check(); cout << "2SAT: success\n";
	Mega_Tarjan_Check();cout << "Tarjan: success\n";
	
	/*try{
		freopen("output.txt", "w", stdout);
		Mega_Tarjan_Check();
		system("PAUSE");
		return 0;
	}
	catch(std::exception& ex){
		std::cout<< ex.what() << std::endl;
		return 1;
	}*/

	/*int size;
	int edges;
	fstream f ("input_top_sort.txt");
	f >> size >> edges;
	vector<pair<int, int> > edge;

	for(int i = 0; i<edges; ++i)
	{
		int a, b;
		f >> a >> b;
		--a;
		--b;
		edge.push_back(make_pair(a, b));
	}

	unique_ptr<IGraph> graph = compact_graph(size, edge); 
	/*topological_sorting Top_Sort;
	commondfs<topological_sorting> sorted(graph, -1, Top_Sort);
	sorted.dfscycle(graph, Top_Sort);

	for(int i = 0; i<Top_Sort.index.size(); ++i) cerr << Top_Sort.index[i] << " ";
	*/
	/*vector<int>answer = component(graph);
	for(int i = 0; i<answer.size(); ++i)cerr << answer[i] << " "; cerr << "\n";
	/*tarjaning cluster;
	commondfs<tarjaning> clustered(graph, -1, cluster);
	clustered.dfscycle(graph, cluster);*/

	//for(int i = 0; i<cluster.components.size(); ++i)cerr << cluster.components[i] << " ";
	
	while(1){}


}